//
//  ViewController.m
//  3FSports
//
//  Created by mac on 16/11/15.
//  Copyright © 2016年 sanAiFuSport.com. All rights reserved.
//

#import "ViewController.h"
#import "sanFanYuanViewController.h"
#import "sanPersonaLController.h"
@interface ViewController ()

@end

@implementation ViewController

#pragma mark-- 实现按钮的点击方法
- (void)btnClick
{
    sanFanYuanViewController *fanY = [[sanFanYuanViewController alloc]init];
    
    [self.navigationController pushViewController:fanY animated:YES];
    
}
#pragma maek-- 实现跳转
- (void)go2AddVc
{
    sanPersonaLController *pVc = [[sanPersonaLController alloc]init];
    
    [self.navigationController pushViewController:pVc animated:YES];

}
#pragma mark-- 搭建界面
- (void)setupUI
{
    self.title = @"首页";
    self.view.backgroundColor = [UIColor orangeColor];
    
    UIBarButtonItem *addItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"header_icon_add"] style:UIBarButtonItemStylePlain target:self action:@selector(go2AddVc)];
    
    self.navigationItem.rightBarButtonItem = addItem;
    
    //mark-- 添加加好按钮
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeContactAdd];
    btn.center = self.view.center;
    [self.view addSubview:btn];
    
    //监听按钮时间
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
}




@end
